
program hello
    implicit none

    print *, NodeInfo(66,'bahianorte.node')

contains

function NodeInfo (UnitNum, FileName)
    integer, intent (in) :: UnitNum
    character (len=*), intent(in) :: FileName
    integer, dimension(4) :: NodeInfo

    open (unit=UnitNum, file=FileName, status='old', action='read' )
    read (UnitNum, *) NodeInfo
    close(UnitNum)
endfunction
!La siguiente subrutina permite leer un fichero de nodos y almacenarlo en una matriz

subroutine NodeRead (UnitNum, FileName, NodeInfo, NodeArray)
integer, intent (in) :: UnitNum
character (len=*), intent (in) :: FileName
integer,dimension (4), intent (in) :: NodeInfo
real, dimension (1:NodeInfo(1), 1:NodeInfo(2)), intent (out) :: NodeArray

endsubroutine

end program

